Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorporate Bioconductor recommendations #164

Merged
merged 11 commits into from
Jan 15, 2025
Merged

Incorporate Bioconductor recommendations #164

merged 11 commits into from
Jan 15, 2025

Conversation

TuomasBorman
Copy link
Contributor

This PR incorporates Bioconductor recommendations for coding practice. It does not modify the functionality.

Comment on lines +547 to 552
if( add.expl.var && is.null(expl.var) ){
eigen_vals <- attr(reduced_dim, "eig")
# Convert to explained variance and take only first two components
expl_var <- eigen_vals / sum(eigen_vals)
expl_var <- expl_var[seq_len(ncomponents)]*100
expl_var <- summary(rda)$concont$importance*100
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed a bug. First of all, the user can specify explained variance to be plotted with expl.var. That is why it must be NULL in line 547. Moreover, I removed line 561 as it overwrote the calculated variance.

@TuomasBorman
Copy link
Contributor Author

I went through this PR, and apart from the bug fix described above, this does not change the functionality. It just fixes the coding style.

@TuomasBorman TuomasBorman merged commit ffba904 into devel Jan 15, 2025
2 of 3 checks passed
@TuomasBorman TuomasBorman deleted the fix_bioccheck branch January 15, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant